package com.oneday.nuo.base.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.oneday.nuo.base.dto.NuoUserDTO;
import com.oneday.nuo.base.entity.NuoUserEntity;

import java.util.Map;

/**
 * 用户表(NuoUser)表服务接口
 *
 * @author liushuai
 * @since 2021-03-13 23:37:50
 */
public interface NuoUserService {

    /**
     * 保存用户
     * @Author: liushuai
     * @Date: 2021/3/14 1:00
     * @param : * @param nuoUserDTO
     * @return :void
     **/
    void saveUser(NuoUserDTO nuoUserDTO);
    /**
     * 根据用户名获取用户
     * @Author: liushuai
     * @Date: 2021/3/14 10:20
     * @param : * @param userName
     * @return :com.oneday.nuo.base.entity.NuoUserEntity
     **/
    NuoUserEntity queryUserInfoByUserName(String userName);
    /**
     * 判断字段是否存在
     * @Author: liushuai
     * @Date: 2021/3/14 10:23
     * @param : * @param userName
     * @param id
     * @return :java.lang.Boolean
     **/
    Boolean queryUserFieldIsExist(SFunction<NuoUserEntity, ?> field, String fieldValue, Object id);

    /**
     * 根据id删除用户
     * @Author: liushuai
     * @Date: 2021/3/14 11:36
     * @param : * @param id
     * @return :void
     **/
    void deleteUserById(Long id);
    /**
     * 根据id查询用户
     * @Author: liushuai
     * @Date: 2021/3/14 11:37
     * @param : * @param id
     * @return :com.oneday.nuo.base.entity.NuoUserEntity
     **/
    NuoUserDTO queryUserById(String id);
     /**
      * 根据部门id分页查询用户信息
      * @Author: liushuai
      * @Date: 2021/3/18 20:32
      * @param : * @param page
      * @param nuoUserDTO
      * @return :com.baomidou.mybatisplus.core.metadata.IPage<com.oneday.nuo.base.entity.NuoUserEntity>
      **/
    IPage<NuoUserEntity> queryUserPageByParam(Page page, NuoUserDTO nuoUserDTO);
}